package com.hhkj.admin.order.service.base;

import com.hhkj.admin.order.common.cont.OrderRefundConst;
import com.hhkj.admin.order.domain.OrderItem;
import com.hhkj.admin.order.model.dopo.OrderItemDo;
import com.hhkj.admin.order.model.dopo.OrderItemPo;
import com.ruoyi.common.base.biz.service.base.BaseService;

import java.util.List;

/**
* @author admin
* @description 针对表【s_order_item(记录每条订单内的子订单情况)】的数据库操作Service
* @createDate 2023-10-27 13:50:53
*/
public interface OrderItemService extends BaseService<OrderItem, OrderItemDo, OrderItemPo> {

    /**
     * 根据id列表 获取对象列表
     * @param idList id列表
     * @return
     */
    List<OrderItem> listByIdList(List<Long> idList);

    /**
     * 批量修改退款状态
     * @param orderItemIdList
     * @param statusCode
     * @return
     */
    boolean updateRefundStatusBatch(List<Long> orderItemIdList, OrderRefundConst.StatusEnum statusCode);

    /**
     * 填充学员课程状态字段 studentCourseStatus
     * @param orderItemPoList
     * @return
     */
    List<OrderItemPo> fillStudentCourseStatus(List<OrderItemPo> orderItemPoList);

    /**
     * 填充学员登录情况字段 loginFlag
     * @param orderItemPoList
     * @return
     */
    List<OrderItemPo> fillLoginFlag(List<OrderItemPo> orderItemPoList);
}
